package web.play.rss.util.dao;

import java.sql.Connection;
import java.sql.DriverManager;


public class Connectioner {

	public Connection getConnection() {
		Connection con = null;
		try {
			Class.forName("org.gjt.mm.mysql.Driver").newInstance();
			String url = "jdbc:mysql://localhost/PoweriBox2?user=root&password=123456";
			// myDB为数据库名
			con = DriverManager.getConnection(url);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return con;
	}
	
	public static void main(String[] args) {
		Connectioner con = new Connectioner();
		
		con.getConnection();
		
	}
}
